<!DOCTYPE html>
<html>
<head>
<!--{template /module/note/theme/mobile/meta}-->
</head>
<body>
	<div class="note">
		<section id="section">
			<!--{template /module/note/theme/mobile/head}-->
			
			<div class="block">
				<form class="pure-form" action="mobile.do?ac=note" method="post" onsubmit="javascript:return check_form(this);">
					<input type="hidden" name="formsubmit" value="yes"/>
					<table>
						<tr>
							<td class="label">
								{lang note.username}
							</td>
							<td>
								<input class="pure-u-1-2" type="text" name="txtUserName" value="{$user[REALNAME]}" size="10" maxlength="10" placeholder="{lang note.username.placeholder}"/>
							</td>
						</tr>
						
						<!--{if $note['NEEDS']['email']}-->
						<tr>
							<td class="label">
								{lang note.email}
							</td>
							<td>
								<input class="pure-u-1" type="text" name="txtEmail" value="{$user[EMAIL]}" size="20" maxlength="50" placeholder="{lang note.email.placeholder}"/>
							</td>
						</tr>
						<!--{/if}-->
						
						<!--{if $note['NEEDS']['connect']}-->
						<tr>
							<td class="label">
								{lang note.connect}
							</td>
							<td>
								<input class="pure-u-1" type="text" name="txtConnect" value="{$user[PHONE]}" size="20" maxlength="20" placeholder="{lang note.connect.placeholder}"/>
							</td>
						</tr>
						<!--{/if}-->
						<tr>
							<td class="label">
								{lang note.content}
							</td>
							<td>
								<textarea class="pure-u-1" rows="4" cols="60" name="txtContent" placeholder="{lang note.content.placeholder}"></textarea>
							</td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td class="button">
								<button class="pure-button pure-submit">{lang note.submit}</button>
							</td>
						</tr>
					</table>
				</form>
			</div>
		</section>
	</div>
	
	<!--{template /module/note/theme/mobile/foot}-->
	
	<script>
	function check_form(frm){
		if(frm.txtUserName.value.trim().length == 0){
			frm.txtUserName.focus();
			return false;
		}
		
		{if $note['NEEDS']['email']}
		if(frm.txtEmail.value.trim().length == 0){
			frm.txtEmail.focus();
			return false;
		}
		{/if}
		
		{if $note['NEEDS']['connect']}
		if(frm.txtConnect.value.trim().length == 0){
			frm.txtConnect.focus();
			return false;
		}
		{/if}
		
		if(frm.txtContent.value.trim().length == 0){
			frm.txtContent.focus();
			return false;
		}
		
		return true;
	}
	
	$(function(){
		$.gotop({id:'gotop'});
	});
	</script>
</body>
</html>
